import { request } from '@/utils/request'

// /api/community/member/submitInfo
// 提交业主信息
export const submitMemberInfo = (params: object) => {
  return request({
    url: '/api/community/member/submitInfo',
    method: 'POST',
    data: params
  })
}
// /api/community/member/updateState
// 修改住户状态
export const updateMemberState = (params: object) => {
  return request({
    url: '/api/community/member/updateState',
    method: 'POST',
    data: params
  })
}

// /api/community/member/building/record/audit
// 审核住户
export const auditMember = (params: object) => {
  return request({
    url: '/api/community/member/building/record/audit',
    method: 'POST',
    data: params
  })
}

// /api/community/member/building/record/page
// 获取住户列表
export const getMemberBuildingPage = (params: object) => {
  return request({
    url: '/api/community/member/building/record/page',
    method: 'GET',
    data: {
      ...params
    }
  })
}
// /api/community/member/building/record/removeSelf
// 删除住户
export const removeMemberRoom = (params: { roomId: string }) => {
  return request({
    url: `/api/community/member/building/record/removeSelf?roomId=${params.roomId}`,
    method: 'POST'
  })
}
// /api/community/member/building/record/unBind
// 解除住户绑定
export const unBindMember = (params: object) => {
  return request({
    url: '/api/community/member/building/record/unBind',
    method: 'POST',
    data: params
  })
}
